package com.reader.cms.mapper.sys;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.reader.cms.entity.sys.SysOrganization;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @@description     Mapper 接口
 * @author           jiahaikun
 * @date             2018-08-06
 */
public interface SysOrganizationMapper extends BaseMapper<SysOrganization> {
    List<Map<String, Object>>  selectListPage(Pagination page, @Param("param") String parms);

    List<SysOrganization> getAllOrganizations(@Param("name")String name,@Param("code")String code);

    List<Integer> getOrganizeRoles(@Param("id") Integer id);

    void insertOrganizationRole(@Param("sysOrganizationId") Integer id,@Param("roleIds") List<Integer> roleIds);

    Integer delSysOrganizationRole(@Param("id") Integer id);

    Integer getUserOfOrganize(@Param("id")Integer id);
}